export const constRoutes = [
  {
    name: 'login',
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      hidden: true,
    },
  },
  {
    name: 'guide',
    path: '/guide',
    component: () => import('@/views/guide/index.vue'),
    meta: {
      title: '引导页',
      hidden: true,
    },
  },
  {
    name: 'layout',
    path: '/',
    component: () => import('@/layout/index.vue'),
    redirect: '/home',
    meta: {
      title: '',
      hidden: true,
    },
    children: [
      {
        name: 'home',
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          icon: 'HomeFilled',
        },
      },
    ],
  },
  {
    name: '404',
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    meta: {
      title: '404',
      hidden: true,
    },
  },
  // {
  //   path: '/screen',
  //   component: () => import('@/views/screen/index.vue'),
  //   name: 'Screen',
  //   meta: {
  //     hidden: false,
  //     title: '数据大屏',
  //     icon: 'Platform',
  //   },
  // },
]

//异步路由
export const asnycRoute = [
  {
    path: '/sys',
    component: () => import('@/layout/index.vue'),
    name: 'Sys',
    meta: {
      title: '系统管理',
      icon: 'Lock',
    },
    redirect: '/sys/user',
    children: [
      {
        path: '/sys/setting',
        component: () => import('@/views/sys/setting/index.vue'),
        name: 'Setting',
        meta: {
          title: '系统设置',
          icon: 'Setting',
        },
      },
      {
        path: '/sys/user',
        component: () => import('@/views/sys/user/index.vue'),
        name: 'User',
        meta: {
          title: '用户管理',
          icon: 'User',
        },
      },
      {
        path: '/sys/role',
        component: () => import('@/views/sys/role/index.vue'),
        name: 'Role',
        meta: {
          title: '角色管理',
          icon: 'UserFilled',
        },
      },
      {
        path: '/sys/permission',
        component: () => import('@/views/sys/permission/index.vue'),
        name: 'Permission',
        meta: {
          title: '菜单管理',
          icon: 'Menu',
        },
      },
      {
        path: '/sys/log',
        component: () => import('@/views/sys/log/index.vue'),
        name: 'Log',
        meta: {
          title: '系统日志',
          icon: 'Monitor',
        },
      },
    ],
  },
  {
    path: '/workflow',
    component: () => import('@/layout/index.vue'),
    name: 'Workflow',
    meta: {
      title: '工作流',
      icon: 'Lock',
    },
    redirect: '/workflow/nodeTree',
    children: [
      {
        path: '/workflow/nodeTree',
        component: () => import('@/views/workflow/design.vue'),
        name: 'NodeTree',
        meta: {
          title: '流程设计器',
          icon: 'Setting',
        },
      },
    ],
  },
  {
    path: '/center',
    component: () => import('@/views/center/index.vue'),
    name: 'Center',
    meta: {
      hidden: true,
      title: '个人中心',
      icon: 'Platform',
    },
  },
]

//任意路由
export const anyRoute = {
  //任意路由
  path: '/:pathMatch(.*)*',
  redirect: '/404',
  name: 'Any',
  meta: {
    title: '任意路由',
    hidden: true,
    icon: 'DataLine',
  },
}
